package com.mjduan.project.src;

import java.util.HashMap;
import java.util.Map;

/**
 * Hans 2017-10-14 01:08
 */
public class Portfolio {
    private Map<String,Product> products=new HashMap<>();

    public Product lookup(String productname) {
        if (!products.containsKey(productname)) {
            products.put(productname,new Product(productname));
        }
        return products.get(productname);
    }

    int totalProductsMade() {
        return products.size();
    }
}
